package cn.labbook.bluetooth.exception;

import cn.labbook.bluetooth.common.SysExceptionEnum;

/**
 * Created by Administrator on 2018/10/29.
 * Description : 系统自定义异常
 */
public class SysException extends RuntimeException {
    private int code = 0;

    public SysException(String message) {
        super(message, null, true, false);
    }

    public SysException(SysExceptionEnum exceptionEnum) {
        this(exceptionEnum.getCode(), exceptionEnum.getMsg());
    }

    public SysException(int code, String message) {
        super(message, null, true, false);
        this.code = code;
    }

    public SysException(int code, String message, Throwable throwable) {
        super(message, throwable, true, false);
        this.code = code;
    }
}
